package admin

import database "hft/Database"

type ActiveBase struct {
	database.Base
	AccountLink string      `json:"accountLink"`
	RegionLink  string      `json:"regionLink"`
	AccountId   int         `json:"accountId"`
	LouPanId    int         `json:"louPanId,omitempty" gorm:"index"`
	Name        string      `json:"title,omitempty"`
	Cover       string      `json:"cover,omitempty" gorm:"type:text"`
	ActiveGroup int         `json:"group,omitempty"`
	IsAudit     int         `json:"isAudit" gorm:"type:tinyint(1);size:1"`
	HasImg      bool        `json:"hasImg"`
	HasVideo    bool        `json:"hasVideo"`
	PureText    string      `json:"pure_text" gorm:"type:longtext"`
	Cont        *ActiveCont `json:"cont,omitempty" gorm:"foreignKey:ActiveId;references:ID;constraint:OnDelete:CASCADE,OnUpdate:CASCADE"`
}

func (ActiveBase) TableName() string {
	return database.TableNameFormat("active_base")
}
